package com.fgchen.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fgchen.util.excel.ExcelConfig;
import com.fgchen.util.excel.ExcelConfigFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by Administrator on 2018-04-09.
 */
@Configuration
public class AppConfig {

    @Autowired
    private ExcelConfigFactory factory;

    @Value("${excel.config.jsonfile.person:person-template.json}")
    private String personJsonFile;

    @Bean
    public ExcelConfig personExcelConfig() throws Exception {
        return this.factory.createExcelConfig(this.personJsonFile);
    }

}